<%@ include file="/jsp/common/taglibs.jsp"%>
<html>
	<link href="css/menu.css" rel="stylesheet" type="text/css" />
	<link href="css/portal.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="js/menu.js"></script>
	<head>
	<script type="text/javascript">
		
		
		function ir(seqTime){
			var frm = document.forms[0];
			frm.action = '<%=request.getContextPath()%>/gerenciarTimes.do?task=paginaDescricaoTime&seqTime=' + seqTime;
			frm.submit();
		}
		
		function buscar(){
			var frm = document.forms[0];		
			frm.action = '<%=request.getContextPath()%>/gerenciarTimes.do?task=paginaBuscarTimes';
			frm.submit();
		}
	</script>
	</head>
	<body>
	
	<html:form action="/gerenciarTimes">
		<html:hidden property="task" name="gerenciarTimesForm" />
			
		<c:if test="${contaVO.logado == 1}">
		<jsp:include page="/jsp/campeonato/cabecalhoLogado.jsp"/>
		</c:if>	
			<c:if test="${contaVO.logado != 1}">
		<jsp:include page="/jsp/campeonato/cabecalho.jsp"/>
		</c:if>	
		<br>
		<table border="0" align="center" width="450" class="bordatabela">
			<tr>
				<td colspan="3" class="fundoescuro" align="center">
					Buscar Time
				</td>
			</tr>
			<tr>
				<td class="fundoclaro" align="center">  
					Nome:
					<html:text name="gerenciarTimesForm" property="timesVO.nomeTime" size="66" maxlength="45" styleClass="input" />
						
					<a href="javascript: buscar();">
						<img src="<%=request.getContextPath()%>/images/icon_lupa.gif" width="16" height="16" border="0" />
					</a>
				</td>
			</tr>
		</table>
		<br><br>
		<logic:messagesPresent message="false">
			<table border="0" cellpadding="0" cellspacing="0" class="texto" align="center">
				<tr>
					<td>
						<html:errors />
						<html:messages id="errors" message="true">
							<c:out value="${errors}" escapeXml="false" />
						</html:messages>
					</td>
				</tr>
			</table>
		</logic:messagesPresent>
		<table border="0" align="center" width="400" class="bordatabela">
			<tr>
				<td align="center" class="fundoescuro">
					Nome Time
				</td>
			</tr>
			<logic:iterate id="lista" name="gerenciarTimesForm" property="listaTimes" indexId="index">
				<tr>
					<td class="fundoclaro" align="center">
						<a href="javascript: ir('<c:out value="${lista.seqTime}"/>');">
							<bean:write name="lista" property="nomeTime" />
						</a>	
					</td>
				</tr>
			</logic:iterate>
		</table>
		</html:form>
	</body>
</html>
